package com.wang.loanassembly.controller;


import com.wang.commons.result.Result;
import com.wang.loanassembly.param.rateParam.AddRateParam;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author lichacha
 * @since 2022-01-04
 */
@Controller
@RequestMapping("/interestRateTable")
@Api(tags = "利率的接口类")
public class InterestRateTableController {
    /**
     * 根据贷款时长查询年化利率,当贷款时长为空时查询所有的利率，
     * 将时长与利率对应关系 展示给用户
     */
    @ApiOperation("查询贷款的年化利率的接口")
    @GetMapping("selectRate")
    public Result selectRate(@ApiParam(name = "lrtTime" ,value = "贷款时长",required = false) @RequestParam("lrtTime")  Integer lrtTime){
        return null;
    }

    /**
     * 修改年化利率，新增删除
     * 传入贷款时长，贷款的年化利率
     */
    @ApiOperation("新增和修改利率的接口")
    public Result addRate(@RequestBody AddRateParam arp){

        return null;
    }
    /**
     * 删除年化利率的接口
     * 根据传入的利率的id进行删除
     */
    @ApiOperation("删除某一个利率的接口")
    @DeleteMapping("delRate")
    public Result delRate( @ApiParam(name="lrtId",value = "利率id",required = true)@RequestParam("lrtId") Integer lrtId ){
        return null;
    }


}

